<%@page import="org.h2.command.ddl.CreateLinkedTable"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="layout" content="main" />
<title>Buscar um Cliente</title>
<g:javascript library="prototype" />

</head>
<body>
	<div class="nav">
		
		<span class="menuButton"><g:link action="list">Listagem de Cliente</g:link></span>

	</div>

	<div class="body">
		<h1>Buscar um Cliente</h1>
		<g:if test="${flash.message}">
			<div class="message">
				${flash.message}
			</div>
		</g:if>

		<g:hasErrors bean="${cliente}">

			<div class="errors">
				<g:renderErrors bean="${cliente }" as="list" />
			</div>
		</g:hasErrors>

		<g:formRemote name="ajaxForm"
			url="[controller:'cliente',action:'doSearch']"
			update="[success:'message',failure:'error']">
		
		<div class="dialog">
			
				
				<p align="left"><label for='nome'>Buscar Nome do Cliente:</label></p>
				<table  style="width: 500px" >
				<tr>
  					<td><input type='text' class="form-control" placeholder="Buscar" name='nome' value='${cliente?.nome}' /></td>
  					<td><button type="submit" class="btn btn-default" value="Buscar">Buscar</button></td>
  				</tr>
					
				</table>
		
				
				</br>
			</div>
			<div class="buttons">
				
			</div>
		</g:formRemote>
	</div>
	<div class="body" id="message" /></div>
	<div class="body" id="error" ></div>
	
</body>
</html>